home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2000 February / Macworld (2000-02).dmg / Shareware World / Comms & Internet / Flex-Able 1.0 / Flex-Able Templates Folder / mail_template.able < prev    next >
Text File  |  1999-08-29  |  1KB  |  48 lines

  1. <!--
  2. This template is built to read in the contents of an HTML form with the fields
  3.     to_name
  4.     to_email
  5.     from_name
  6.     from_email
  7.     subject
  8.     body
  9. and process them into an email message fit to be sent via MailAgent.
  10. -->
  11.  
  12. <HTML><HEAD><TITLE></TITLE></HEAD>
  13. <BODY>
  14.  
  15. <!-- read the contents of the form into Flex-Able and call it "MailData" -->
  16. <:set MailData <:form_read>>
  17.  
  18. <!-- require specific fields to be filled out -->
  19. <:require MailData["to_email"] MailData["from_email"]>
  20.  
  21. <!-- build the message -->
  22. <:mail>
  23. To: <:echo MailData["to_name"] "<"MailData["to_email"]">"
  24. From: <:echo MailData["from_name"] "<"MailData["from_email"]">"
  25. Subject: <:echo MailData["subject"]>
  26.  
  27. <:echo MailData["body"]>
  28. <:/mail>
  29.  
  30. RESPONSE HTML
  31. </body></html>
  32.  
  33. <!-- if the required fields have not been filled out -->
  34. <:else>
  35.     <h2>You neglected to fill out the following required fields</h2>
  36.     <ul>
  37.         <li><:ifempty form["from_email"]>Sender's email address
  38.             <:/ifempty>
  39.         <li><:ifempty form["to_email"]>Recipient's email address
  40.             <:else>But you entered the recipient's email, which is nice
  41.             <:/ifempty>
  42.         <li><:ifempty form["body"]>The body of the message
  43.             <:/ifempty>
  44.     </ul>
  45. </body></html>
  46. <:/require>
  47.  
  48.